﻿using System;
using System.Drawing;

namespace Ants.SimpleDistributionProblem.DTO
{
    /// <summary>
    /// Class representing route part.
    /// </summary>
    public class RoutePart
    {
        /// <summary>
        /// Gets the cost.
        /// </summary>
        /// <value>
        /// The cost.
        /// </value>
        public double Cost
        {
            get
            {
                return Math.Sqrt(Math.Pow(Math.Abs(PointA.X - PointB.X), 2) + Math.Pow(Math.Abs(PointA.Y - PointB.Y), 2));
            }
        }

        /// <summary>
        /// Gets or sets the pheromone amount.
        /// </summary>
        /// <value>
        /// The pheromone amount.
        /// </value>
        public double PheromoneAmount { get; set; }

        /// <summary>
        /// Gets or sets the point A.
        /// </summary>
        /// <value>
        /// The point A.
        /// </value>
        public Point PointA { get; set; }

        /// <summary>
        /// Gets or sets the point B.
        /// </summary>
        /// <value>
        /// The point B.
        /// </value>
        public Point PointB { get; set; }
    }
}